import Vue from "vue";
import VueRouter from "vue-router";
import myDeliver from "../views/myDeliver.vue";
import myQueue from "../views/myQueue.vue";
import Logistics from "../views/User-request/Logistics.vue";
import Logistics1 from "../views/User-request/Logistics1.vue";
import Logistics2 from "../views/User-request/Logistics2.vue";
import Logistics3 from "../views/User-request/Logistics3.vue";
import Logistics4 from "../views/User-request/Logistics4.vue";
//import advice from "../views/User-request/advice.vue"
import Upload from "../views/User-request/Upload.vue";
import Home from "../views/User-request/Home.vue";
import User from "../views/User-request/user";
import BuyPage from "../views/BuyPage.vue"
import DrawPage from "../views/DrawPage.vue"
import TaskCard from "../接单页面/TaskCard"
import TaskDetail from "../接单页面/TaskDetail"
import zhuce from '../views/zhuce.vue'
import Login from "../views/Login.vue"
import produce from '../views/produce.vue'
import NaviPage from '../views/NaviPage.vue'
//import TaskCard from '../views/TaskCard'
Vue.use(VueRouter);

const routes = [
     {
    path: '/',
    name: 'Login',
    component: Login,
    
  },
  {
    path: '/zhuce',
    name: 'zhuce',
    component: zhuce,
    
  },
  {
    path: '/produce',
    name: 'produce',
    component: produce,
    
  },
  {
    path: "/deliver",
    name: "DeliverApp",
    component: myDeliver,
  },
  {
    path: "/queue",
    name: "QueueApp",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: myQueue,
    //() =>
    //import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
  },
  {
    path: "/Logistics",
    name: "Logistics",
    component: Logistics,
  },
  {
    path: "/Logistics1",
    name: "Logistics1",
    component: Logistics1,
  },
  {
    path: "/Logistics2",
    name: "Logistics2",
    component: Logistics2,
  },
  {
    path: "/Logistics3",
    name: "Logistics3",
    component: Logistics3,
  },
  {
    path: "/Logistics4",
    name: "Logistics4",
    component: Logistics4,
  },
  
  {
    path: "/home",
    name: "Home",
    component: Home,
    children: [
      
      {
        path: "/upload",
        name: "upload",
        component: Upload,
      },
]
  },
  {
    path:"/buy",
    name:'buy',
    component:BuyPage
  },
  {
    path:'/draw',
    name:'draw',
    component:DrawPage
  },
  {
    path: '/TaskCard',
    name: 'TaskCard',
    component: TaskCard,
},
{
    path: '/TaskDetail',
    name: 'TaskDetail',
    component: TaskDetail,
},
{
  path:'/user',
  name:'user',
  component:User
},
{
  path:'/navi',
  name:'navi',
  component:NaviPage
}
];


const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
});

export default router;
